Native PHP worker pool on all platforms#3602
Conversation
… through a stack trace' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
📊 Performance Test ResultsComparing c829764 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
fredrikekelund
left a comment
There was a problem hiding this comment.
LGTM 👍 @bcotrim and I worked on this side by side at our meetup last week. Benchmark-wise, we concluded that there's no noticeable drawback to this approach compared to PHP_CLI_SERVER_WORKERS, so we're going with this "poor man's php-fpm" approach on all platforms
…into add-native-php-worker-pool-poc
…r-pool-poc # Conflicts: # .buildkite/pipeline.yml
There was a problem hiding this comment.
The changes in this file fix RSM-3965
There was a problem hiding this comment.
The changes in this file and in .buildkite/pipeline.yml serve to collect all site logs when an E2E test fails. Site logs are typically forwarded to the main process anyway, but this seems like a sensible thing to keep as the default. It will only make debugging easier
|
The Linux E2E breakage seems to be CI specific and it exists on trunk, too. I'm proceeding to merge this PR |
Related issues
How AI was used in this PR
Proposed Changes
Using
PHP_CLI_SERVER_WORKERSfor concurrency is only supported on macOS and Linux. We want concurrency on Windows, too. This PR accomplishes that by implementing a Node.js HTTP load balancer that proxies requests to a fixed pool of 4php -Sprocesses. This works surprisingly well in our testing.In our benchmarks, this solution yields ~30% performance improvement on Windows compared to Playground.
Testing Instructions
CI should pass
Pre-merge Checklist